home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / ThreadLibrary 1.3 / Documentation / Version History < prev   
Encoding:
Text File  |  1995-10-04  |  16.1 KB  |  433 lines  |  [TEXT/R*ch]

  1. Version History
  2. ---------------
  3.  
  4. * 1.3
  5.  
  6. - Modified TLM to work with CFM68K.
  7.  
  8. - Updated project files for CW7.
  9.  
  10. - Updated build scripts for CW7.
  11.  
  12. - Changed library suffixes.
  13.  
  14. * 1.2.1 950921 (public distribution)
  15.  
  16. - Split the "Build.as" Apple script into two files, one of which is
  17. reusable.
  18.  
  19. * 1.2 950918 (limited distribution)
  20.  
  21. This version fixes some errors in the Thread Library Manager library.
  22. These fixes are in place because I am using this compatability layer in
  23. my own application, which afforded me the opportunity to do additional
  24. testing. Please note that not all of the TLM library has been tested.
  25.  
  26. - Thread Library Manager automatically calls through to Thread Manager
  27. if it is installed, otherwise it uses Thread Library.
  28.  
  29. - Result parameter to TLMDisposeThread is checked against NULL before
  30. assigning to thread's result.
  31.  
  32. - TLMGetSpecificThreadCount was renamed to
  33. TLMGetSpecificFreeThreadCount.
  34.  
  35. - TLMThreadCurrentStackSpace takes an unsigned long parameter instead
  36. of a signed long.
  37.  
  38. - Added TLMSetThreadTerminator.
  39.  
  40. - Thread Library's main thread is automatically created the first time
  41. a function in TLM accesses it, even if TLMNewThread has not yet been
  42. called.
  43.  
  44. - Fixed conversion of Thread Library serial numbers to and from Thread
  45. Manager ID numbers.
  46.  
  47. - Version number jumps from 1.0 to 1.2 to avoid confusion with the
  48. version assigned to the distribution by the info-mac moderators.
  49.  
  50. * 1.0 950608 (public distribution)
  51.  
  52. - What I thought was a bug under UniFinder was not a bug in Thread
  53. Library, but probably an incorrect startup disk or an error in the
  54. build script. When I rebuilt the library, and started up with a copy of
  55. System 6.0.5 on my hard disk, Thread Library ran fine on my Macintosh
  56. Plus running System 6.0.5 with both UniFinder and MultiFinder.
  57.  
  58. * 1.0d4.8 950608 (limited distribution)
  59.  
  60. - Wrapped headers in "extern C" so they can be used in C++ source code.
  61.  
  62. - Tested TLM layer by using it in Apple's ThreadedSort example program.
  63. It took very little time to convert to TLM and the PPC and 68K versions
  64. ran perfectly.
  65.  
  66. - Added macros to "ThreadLibraryManager.h" to simplify using the
  67. library with Thread Manager.
  68.  
  69. - Added more detailed information on adding TLM to an existing
  70. application.
  71.  
  72. - Discovered that Thread Library does not work under UniFinder in
  73. System 6.0.5.
  74.  
  75. * 1.0d4.7 950531 (limited distribution)
  76.  
  77. - Added PowerPC shared libraries "ThreadLibrary-PPC.lib" and
  78. "ThreadLibrary-PPC-Dbg.lib".
  79.  
  80. - Added note about using WaitNextEvent.
  81.  
  82. - Removed "Stop" buttons from demo dialogs.
  83.  
  84. * 1.0d4.6 950513 (limited distribution)
  85.  
  86. - Added ThreadLibraryManager interface.
  87.  
  88. - Added AppleScript to automate build procedure.
  89.  
  90. - Improved test application (can now display multiple windows).
  91.  
  92. - Put back the function ThreadStackFrame.
  93.  
  94. - Removed special VBL task due to spurious breaks into the debugger
  95. caused by the stack sniffer VBL task and the sentinel value placed at
  96. the end of a thread's stack.
  97.  
  98. - Added missing check to exclude disabled threads from calculation of
  99. yield interval in ThreadYieldInterval.
  100.  
  101. - Added memory allocation callbacks.
  102.  
  103. - Expanded, formatted, and generally improved documentation.
  104.  
  105. - Added ThreadStackSize function.
  106.  
  107. - Made native PowerPC version.
  108.  
  109. - Removed ThreadSaveFPU and ThreadSaveFPUSet.
  110.  
  111. * 1.0d4.5 941212 (limited distribution)
  112.  
  113. In brief, version 1.0d4.5:
  114.  
  115. - Fixes an error in v1.0d4.4 in the call to the suspend callback
  116. function.
  117.  
  118. - Changes the existing functional specification that may affect
  119. applications that installed a suspend callback function; applications
  120. that did not install a suspend callback function will not be affected
  121. by this change.
  122.  
  123. - Adds definitions for macros and functions that may be used to stub
  124. out calls to Thread Library.
  125.  
  126. - Several callback functions were added to provide greater control to
  127. an application using Thread Library.
  128.  
  129. - Error codes are stored with each thread.
  130.  
  131. - Changed return value for ThreadCount from 'short' to 'long'.
  132.  
  133. - Removed the function ThreadStackFrame and the typedef for
  134. ThreadStackFrameType.
  135.  
  136. - Saves floating pointer registers if there is a floating point unit.
  137.  
  138. - Separated register saving and restoring code to simplify port to
  139. native PowerPC version.
  140.  
  141. - Removed most compiler dependencies.
  142.  
  143. - Added functions for enabling and disabling a thread.
  144.  
  145. In greater detail, these changes are:
  146.  
  147. - The suspend procedure for a thread was being passed the data
  148. parameter for the thread being resumed, instead of the data parameter
  149. for the thread being suspended.
  150.  
  151. - I've added a couple of files, "ThreadStubsLib.c" and
  152. "ThreadStubLib.h". You can use these files to stub out the calls to
  153. Thread Library. See the comment in ThreadStubLib.h for more details.
  154.  
  155. - Two new callback functions, called "begin" and "end", have been
  156. added. These functions are called before a thread is first executed and
  157. before a thread is disposed of, respectively. Functions for getting and
  158. setting all of the callback functions have been added to the interface
  159. to Thread Library.
  160.  
  161. - The sequence of calls, over the lifetime of a thread, of the callback
  162. functions installed by the application has been defined more precisely.
  163. There is some redundancy in the new sequence, but it is symmetrical and
  164. is nearly fully compatible with prior versions of Thread Library. The
  165. new sequence of calls is:
  166.  
  167. ( begin, resume, entry ( suspend, resume ) x Ntimes, suspend, end
  168.  
  169. This new sequence is described in greater detail in the documentation.
  170.  
  171. The old sequence was:
  172.  
  173. resume, entry ( suspend, resume ) x Ntimes
  174.  
  175. This old sequence had an asymmetry, which meant that the resume
  176. function could be called one more time than the suspend function. The
  177. new sequence ensures that the suspend function is called the exact same
  178. number of times as the resume function.
  179.  
  180. For existing applications that installed a suspend function, you will
  181. have to verify that the suspend function can be called even after the
  182. entry point has returned, and that your application does not otherwise
  183. rely on this asymmetric behavior of Thread Library.
  184.  
  185. - The error code from the last call to a Thread Library function is
  186. stored with the thread that was active at the time of the call. In
  187. addition, a global error variable is used if there are no threads in
  188. existence (including the main thread) at the time of the call to Thread
  189. Library. This should not affect any existing applications, but was done
  190. as an internal enhancement to support preemptive threads (if I ever add
  191. preemptive thread support).
  192.  
  193. - Most of the compiler dependencies have been removed. Thread Library
  194. has been successfully compiled using THINK C 7.0.3, MPW 3.3.1, and
  195. CodeWarrior DR4.
  196.  
  197. - Two functions, ThreadEnabled and ThreadEnabledSet, allow you to
  198. determine whether a thread is enabled and to enable or disable a
  199. thread. Only enabled threads are scheduled for execution. The main
  200. thread cannot be disabled.
  201.  
  202. * 1.0d4.4 940907 (limited distribution)
  203.  
  204. Version 1.0d4.4 adds the function ThreadEndAll. From the README file:
  205.  
  206. ThreadEndAll disposes of all threads, including the main thread.
  207. ThreadEndAll is useful when your application is terminating and you
  208. want to dispose of any threads that may still exist. ThreadEndAll can
  209. be called only from within the main thread.
  210.  
  211. * 1.0d4.3 940715 (limited distribution)
  212.  
  213. Version 1.0d4.3 fixes a problem with compiling with Apple's old
  214. (non-universal) headers. I'd just forgotten to put in an ifdef around
  215. the VBLUPP stuff.
  216.  
  217. * 1.0d4.2 940706 (limited distribution)
  218.  
  219. Version 1.0d4.2 fixes one bug, adds a few optimizations, and slightly
  220. alters the functional interface to Thread Library.
  221.  
  222. - Fixed error in detecting events that was introduced in 1.0d4.1.
  223.  
  224. - Fixed order of execution of actions taken when a thread is resumed
  225. (the stack sniffer was being resumed before the low-memory globals were
  226. restored)
  227.  
  228. - Removed the functions ThreadStatus and ThreadStatusSet, and the
  229. associated type definitions. The same functionality that was provided
  230. by these functions can be accomplished using the thread's data field,
  231. or using an application's global variables.
  232.  
  233. - Added support for the universal headers. If you need to recompile the
  234. demo applications, note that the calls to InitDialogs may cause a type
  235. error if you're using the old headers. Just change the parameter to
  236. InitDialogs from zero to NULL.
  237.  
  238. - Added ThreadErrorType and defined an error code.
  239.  
  240. * 1.0d4.1 940609 (limited distribution)
  241.  
  242. Version 1.0d4.1 fixes one bug. It does not alter the functional
  243. interface to Thread Library.
  244.  
  245. - ThreadSchedule and ThreadYield no longer call EventAvail to test for
  246. events. Instead, they look at low-memory globals and call CheckUpdate.
  247. This was necessary since calling EventAvail within a thread allowed the
  248. application to be switched out while the ApplLimit, HeapEnd, and
  249. CurStackBase low-memory globals were set to non-standard values. This
  250. didn't cause any major problems, but Barry Kirsch noticed that the
  251. Finder's About window would display an incorrect value for the
  252. application, as if the application had used its entire memory
  253. partition. Removing the call to EventAvail solved this problem.
  254.  
  255. * 1.0d4 940316 (public distribution)
  256.  
  257. Version 1.0d4 of Thread Library is primarily a bug-fix release. The
  258. functional interface has not changed since v1.0d2.2.
  259.  
  260. - Writing the sentinel value in v1.0d3 introduced a bug that corrupted
  261. the application's heap. This was caused by writing the sentinel value
  262. to the application's main stack at the location pointed to by
  263. ApplLimit. Apparently, there are some important data about the heap at
  264. that location, and overwriting them caused the heap to become
  265. corrupted. This was the most serious error yet in any released version
  266. of Thread Library and only slipped through because I didn't adequately
  267. test v1.0d3. The sentinel value is still written to the stacks of
  268. threads other than the main thread. I spent more time testing the
  269. current release, and it seems to work ok.
  270.  
  271. - The ThreadsTest application had some errors in the way it handled
  272. events in its simple event loop. This could have resulted in errors
  273. handling mouse clicks and in handling update events. The current
  274. version should fix those problems.
  275.  
  276. - The variables gThread and gThreadStackSniffer, defined in the file
  277. "ThreadLib.c", were declared with global scope, and could have
  278. conflicted with other variables in an application. These variables are
  279. now declared with static scope to eliminate such conflicts.
  280.  
  281. - Made the type ThreadSNType a synonym for the type ThreadType.
  282. Applications should refer to threads using variables of type
  283. ThreadType. The type ThreadSNType is included for compatability with
  284. versions 1.0d2.2 through 1.0d3. New applications should no longer use
  285. the type ThreadSNType.
  286.  
  287. - Increased the running time of tests in the ThreadsTest application
  288. from 30 seconds to 45 seconds. The time remaining to each test is now
  289. displayed in seconds rather than in ticks.
  290.  
  291. - The ThreadsTest application includes code to enable heap checking and
  292. discipline in TMON or MacsBug. To enable the code, you need to define
  293. DEBUGGER_CHECKS as 1 in the file "ThreadsTest.c".
  294.  
  295. * 1.0d3 940301 (limited public distribution, only posted to the Boston
  296. Computer Society's Mac BBS)
  297.  
  298. - A sentinel value is written to the bottom of the stack to help the
  299. stack sniffer VBL task catch stack overrun.
  300.  
  301. - The ThreadsTest application uses WaitNextEvent if it's available.
  302.  
  303. - Made some minor changes to the code, updated some of the
  304. documentation and the terms of use, and updated the results for the
  305. ThreadTimed application.
  306.  
  307. - Did some minor editing to the "Distribution" document so that I could
  308. use it for other free utilities I've released.
  309.  
  310. * 1.0d2.2 940225 (limited distribution)
  311.  
  312. - Added ifdef around the defines for the macros for accessing
  313. low-memory globals so that the code can be compiled using either
  314. "SysEqu.h" or THINK C's "LoMem.h".
  315.  
  316. * 1.0d2.2 940222 (limited distribution)
  317.  
  318. - All threads are referred to using thread serial numbers instead of
  319. thread pointers. This makes the functional interface more robust
  320. without affecting the speed of calls to ThreadYield and the other
  321. context switching routines. Most type definitions were made private and
  322. removed from the interface file "ThreadLib.h".
  323.  
  324. - Added the functions ThreadSleepSet, ThreadData, ThreadDataSet.
  325.  
  326. - Threads are stored in a doubly-linked circular queue of threads.
  327.  
  328. - When a thread is activated it is moved to the end of the queue of
  329. threads, so that the round-robbin scheduling is fairer (since the main
  330. thread has the highest priority).
  331.  
  332. - Fixed the problem encountered by some users that prevented the
  333. ThreadsTest application from updating the counters. Certain low-memory
  334. globals are saved and restored on context switches (these are the same
  335. low-memory globals that Thread Manager saves and restores). This fixes
  336. the update problem, which I suspect was due to some routines in
  337. QuickDraw making certain undocumented assumptions about the location of
  338. the stack relative to the location of heap.
  339.  
  340. * 1.0d2.1 940218 (limited distribution)
  341.  
  342. This release is intended primarily to help catch an update problem in
  343. the ThreadsTest application.
  344.  
  345. - The ThreadsTest application now runs first using Thread Manager, then
  346. using Thread Library. Added a "Stop" button to skip a test.
  347.  
  348. - Put back the code to save and restore certain low-memory globals
  349. during context switches in "ThreadLib.c"
  350.  
  351. - Minor improvements to error reporting: "ThreadLib.c" will display a
  352. simple string in the debugger if an assertion fails; "ThreadTimed.c"
  353. will display errors using printf instead of DebugStr.
  354.  
  355. - Minor additions to the documentation and to the description of the
  356. functional interface.
  357.  
  358. - Removed the compiled libraries; anyway they probably wouldn't work
  359. with THINK C 6.0 or MPW and it's too much work to try to keep them
  360. synchronized every time I modify the code (I need a scriptable
  361. interface).
  362.  
  363. - Added "reserved" field to the ThreadType structure (this is a private
  364. field reserved for future use).
  365.  
  366. - To reduce the possibility of conflict with user-defined types, uses
  367. ThreadLinkType instead of LLType, ThreadTicksType instead of TicksType,
  368. THREAD_TICKS_MAX instead of TICKS_MAX, and THREAD_TICKS_SEC instead of
  369. TICKS_SEC. Now every type and function defined in "ThreadLib.h" is
  370. preceded with the prefix "Thread", and every constant is preceded with
  371. the prefix "THREAD_".
  372.  
  373. - "ThreadLib.c" includes actual header files instead of using THINK C's
  374. non-standard MacHeaders. This was done primarily so I could use
  375. "SysEqu.h" instead of "LoMem.h", but it will also make porting to
  376. another compiler easier.
  377.  
  378. - Added THREAD_DEBUG so thread debug code can be selectively disabled
  379. without defining NDEBUG and surrounded debug functions with conditional
  380. compile directives to reduce dead-code size in non-debug version.
  381.  
  382. * 1.0d2 940217 (public distribution)
  383.  
  384. - Added thread serial number field, and the functions ThreadSN and
  385. ThreadFromSN to access the field. Each thread is assigned a unique
  386. serial number to avoid the possibility of disposing of a thread more
  387. than once.
  388.  
  389. - Fixed problem with the "defer and combine stack adjusts" option to
  390. the THINK C optimizer.
  391.  
  392. - Added a stack sniffer VBL task to help detect stack overflow.
  393.  
  394. - Added the functions ThreadStackMinimum and ThreadStackDefault for
  395. determining the minimum and the default stack sizes for threads and
  396. removed the constant THREAD_STACK_SIZE.
  397.  
  398. - Added ThreadTimed test application.
  399.  
  400. - Improved documentation.
  401.  
  402. - For efficiency, defined TickCount as Ticks low-memory global, and
  403. made a few other changes.
  404.  
  405. - For greater ease in adding ThreadLib to other people's applications,
  406. removed use of exceptions. This also increases the efficiency of
  407. context switches in applications that don't use exceptions.
  408.  
  409. - ThreadLib.c now compiles into under 2K (instead of 4.5K) when all
  410. debug code is disabled and all optimizations are enabled.
  411.  
  412. - Removed THREAD_SAVE_GLOBALS code since it didn't seem to be needed.
  413.  
  414. - Added compiled debug and optimized libraries.
  415.  
  416. * 1.0.d1.1 (limited distribution)
  417.  
  418. - Threads are allocated as pointers instead of handles, making them
  419. more efficient.
  420.  
  421. - Fixed a possible bug in the way ThreadSchedule called EventAvail.
  422.  
  423. - Added status field to threads and ThreadStatus/ThreadStatusSet
  424. functions to get and set the value of the field.
  425.  
  426. - The test application uses a modeless dialog so it can be put into the
  427. background, the size flags were set so the system won't complain on
  428. 32-bit systems, and it will display an alert if there's an error.
  429.  
  430. * 1.0d1 940211 (public distribution)
  431.  
  432. First release.
  433.